﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for XuLy
/// </summary>
public class XuLy
{
	
		SqlCommand command;
        SqlDataAdapter adapter;
        DataSet ds;
        DataTable dt;
        KetNoi kn= new KetNoi();
        public DataTable Load(string query)
        {
            kn.MoKN();
            adapter = new SqlDataAdapter(query, kn.connection);
            ds = new DataSet();
            adapter.Fill(ds);
            kn.DongKN();
            return ds.Tables[0];
        }
        public void XuLyDuLieu(string query)
        {
            kn.MoKN();
            command = new SqlCommand(query, kn.connection);
            command.ExecuteNonQuery();
            kn.DongKN();
        }
}